<div class="modal-header">
	<h3 class="modal-title">{{ 'Share model' | translate }}</h3>
</div>

<div class="modal-body">
	<form class="form-horizontal" role="form" name="modelForm">
		<div class="form-group">
			<div class="col-sm-offset-3 col-sm-7">
				<div class="checkbox">
					<label for="share-model">
						<input id="share-model" type="checkbox" ng-model="$ctrl.shared" ng-click="$ctrl.toggleShare(!$ctrl.shared)"/>
						<span>{{ 'Create public link' | translate }}</span>
					</label>
				</div>
			</div>
			<div class="col-sm-offset-3 col-sm-7">
				<div class="checkbox">
					<label for="share-import-config">
						<input id="share-import-config" type="checkbox" ng-model="$ctrl.importAllowed" ng-disabled="!$ctrl.shared"/>
						<span>{{ 'Enable import' | translate }}</span>
						<p class="note">{{ 'Allow users to make copies using the public link' | translate }}</p>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label for="import-model" class="col-sm-3 control-label">{{ 'URL' | translate }}</label>
			<div class="col-sm-6">
				<input
					class="form-control"
					ng-class=""
					type="url"
					pattern="https://.*"
					id="import-model"
					autocomplete="off"
					readonly
					data-ng-model="$ctrl.url"
				/>
				<p class="note">{{ 'People will be able to see but not modify your model' | translate }}</p>
			</div>
			<div class="col-sm-3">
				<button type="submit" class="btn btn-default" style="margin-left: -24px;" ng-click="$ctrl.copy()" ng-disabled="!$ctrl.url">{{ 'Copy' | translate }}</button>
			</div>
		</div>
	</form>
</div>

<div class="modal-footer">
	<button class="br-button warning" type="button" ng-click="$ctrl.cancel()">{{ 'Cancel' | translate }}</button>
	<button class="br-button" type="button" ng-click="$ctrl.save()">{{ 'Salvar' | translate }}</button>
</div>